#ifndef SELECTION_H
#define SELECTION_H

#include <iostream>
#include "tooleffect.h"
#include "Layer/layer.h"

class DrawingArea;

class Selection : public ToolEffect
{
public:
    //************************************************************* Constructor
    Selection(DrawingArea* drawingAreaUse);
    //************************************************************* Get
    bool getIsDeselectionned();
    int getBeginX();
    int getBeginY();
    int getEndX();
    int getEndY();
    virtual Layer* imageSelected(Layer* layer, int posX = 0, int posY = 0);
    void paint(QPainter *painter,const QStyleOptionGraphicsItem *option, QWidget *widget);
protected :
    int xBegin;
    int yBegin;
    int xEnd;
    int yEnd;
    // Indicate if the area seletionned is empty or no
    bool isSelectionEmpty;
    // Indicate that the user is currently drawing (indicating) the selection
    bool isDrawingSelection;
    // Indicate that there a non selection for the moment
    bool isDeselectionned;
};

#endif // SELECTION_H
